import request from '@/utils/request'
//导出是export default 以后 你导入的时候 必须取一个名字

export default {

  addCourseInfo(courseInfo) {
    return request({
      url: `/course/addCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },
  findCourseInfo(courseId) {
    return request({
      url: `/course/getCourseAndDes/${courseId}`,
      method: 'post',
    })
  },
  updateCourse(courseInfo) {
    return request({
      url: `/course/updateCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },
}

// 通用上传请求
export function uploadImage(file) {
  return request({
    url: "http://localhost:8080//eduservice/teacher/uploadAvatar",
    method: 'post',
    data: file
  })
}
